package com.caiya.service.impl;

import com.caiya.cart.entity.CartUser;
import com.caiya.mapper.UserMapper;
import com.caiya.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * Created by Administrator on 2018/11/22 0022.
 */
@Service
public class UserServiceImpl implements UserService{
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<CartUser> list() {
        Example example = new Example(CartUser.class);
        Example.Criteria criteria = example.createCriteria();
        criteria.andEqualTo("id",1);
        List<CartUser> cartUsers = userMapper.selectByExample(example);
        return cartUsers;
    }
}
